
import type { FilterItem } from '@/components/FilterBar/types';
export const exampleOptions: FilterItem[] = [
	{
		label: '事件级别', // 后续由接口获取下拉数据
		prop: 'level',
		type: 'checkbox',
		span: 12,
		defaultValue: [],
		inputProps: {
			showCheckAll: true,
			options: [{ label: '', value: '' }],
		},
		events: {
			change: (value: any, evt: any) => {},
		},
	},
	{
		label: '区域处置单位',
		prop: 'region',
		type: 'select',
		span: 12,
		defaultValue: '',
		inputProps: {
			clearable: true,
			placeholder: '请选择',
			options: [{ label: '全部', value: '' }],
		},
	},
	{
		label: '状态',
		prop: 'status',
		type: 'select',
		span: 12,
		defaultValue: '',
		inputProps: {
			clearable: true,
			placeholder: '请选择状态',
			options: [
				{ label: '全部', value: '' },
				{ label: '启用', value: '1' },
				{ label: '禁用', value: '0' },
			],
		},
	},
	{
		label: '后果/影响',
		prop: 'consequence',
		type: 'input',
		span: 12,
		inputProps: {
			clearable: true,
		},
	},
];

export const dialogAddOptions: FilterItem[] = [
	{
		label: '事件类型名称:',
		prop: 'typename',
		type: 'input',
		span: 24,
		width: '125px',
		inputProps: {
			clearable: true,
		},
		events: {
			// eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-unused-vars
			change: (value: any, evt: any) => {},
		},
	},
];

export const eventInfoOptions: FilterItem[] = [
	{
		label: '父级分类:',
		prop: 'parentTpye',
		type: 'input',
		span: 8,
		isDisabled: true,
		inputProps: {},
	},
	{
		label: '事件类型名称:',
		prop: 'eventTypeName',
		type: 'input',
		span: 8,
		isDisabled: true,
		inputProps: {},
	},
	{
		label: '紧急程度:',
		prop: 'exigenceLevel',
		type: 'select',
		span: 8,
		inputProps: {},
	},
	{
		label: '后果/影响:',
		prop: 'result',
		type: 'textarea',
		span: 24,
		inputProps: {
			clearable: true,
			maxlength: '200',
		},
	},
	{
		label: '事件等级:',
		prop: 'eventLevel',
		type: 'select',
		span: 8,
		defaultValue: '',
		inputProps: {},
	},
	{
		label: '事件等级编号:',
		prop: 'eventTypeNum',
		type: 'input',
		span: 8,
		inputProps: {
			clearable: true,
		},
	},
	{
		label: '区域处置单位:',
		prop: 'processGroup',
		type: 'select',
		span: 8,
		inputProps: {},
	},
	{
		label: '状态:',
		prop: 'enable',
		type: 'radio',
		span: 24,
		defaultValue: '1',
		inputProps: {
			options: [
				{ label: '启用', value: '1' },
				{ label: '挂起', value: '0' },
			],
		},
	},
];
export const eventForewarningOptions: FilterItem[] = [
	{
		label: '是否预警:',
		prop: 'isForewarning',
		type: 'radio',
		span: 8,
		defaultValue: '',
		inputProps: {
			options: [
				{ label: '是', value: '1' },
				{ label: '否', value: '0' },
			],
		},
	},
	{
		label: '人数影响阈值:',
		prop: 'personThreshold',
		type: 'inputNumber',
		controlsPosition: 'right',
		span: 8,
		inputProps: {},
	},
	{
		label: '预警内容:',
		prop: 'forewarningContent',
		type: 'textarea',
		span: 24,
		inputProps: {
			clearable: true,
      maxlength: '200',
		},
		events: {
			change: (value: any, evt: any) => {
				if (value.includes(' ')) {
					value = value.replace(/\s/g, '');
				}
			},
		},
	},
];

export const eventIntoAccidentOptions: FilterItem[] = [
	{
		label: '是否启用:',
		prop: 'isenable',
		type: 'radio',
		span: 24,
		defaultValue: '',
		inputProps: {
			options: [
				{ label: '是', value: '1' },
				{ label: '否', value: '0' },
			],
		},
	},
	{
		label: '人数影响阈值:',
		prop: 'intoPersonThreshold',
		type: 'inputNumber',
		controlsPosition: 'right',
		span: 8,
		inputProps: {
			clearable: true,
		},
	},
	{
		label: '事件等级阈值:',
		prop: 'eventLevelThreshold',
		type: 'select',
		span: 8,
		defaultValue: '',
		inputProps: {},
	},
	{
		label: '事件紧急程度阈值:',
		prop: 'exigenceLevelThreshold',
		type: 'select',
		span: 8,
		defaultValue: '',
		width: '130px',
		inputProps: {},
	},
	{
		label: '预警内容:',
		prop: 'intoForewarningContent',
		type: 'textarea',
		span: 24,
		inputProps: {
			clearable: true,
      maxlength: '200',
		},
		events: {
			change: (value: any, evt: any) => {
				if (value.includes(' ')) {
					value = value.replace(/\s/g, '');
				}
			},
		},
	},
];
export const eventEvaluateOptions: FilterItem[] = [
	{
		label: '是否启用:',
		prop: 'evaluateIsenable',
		type: 'radio',
		span: 24,
		defaultValue: '',
		inputProps: {
			options: [
				{ label: '是', value: '1' },
				{ label: '否', value: '0' },
			],
		},
	},
	{
		label: '响应时间:',
		prop: 'responseTime',
		type: 'inputBtn',
		span: 8,
		inputProps: {
			unit: '分钟',
		},
	},
	{
		label: '权重:',
		prop: 'responseWeight',
		type: 'input',
		span: 8,
		inputProps: {
			clearable: true,
			placeholder: '  %',
		},
	},
	{
		label: '得分区间:',
		prop: 'responseSectionStart',
		type: 'inputNumber',
		controlsPosition: 'right',
		span: 4,
		inputProps: {},
		events: {
      change: (value: any, evt: any) => {}
    }
	},
	{
		label: '~　　　',
		prop: 'responseSectionEnd',
		type: 'inputNumber',
		controlsPosition: 'right',
		span: 4,
		inputProps: {},
		events: {
      change: (value: any, evt: any) => {}
    }
	},
	{
		label: '处理方式:',
		prop: 'processing',
		type: 'input',
		span: 8,
		inputProps: {
			clearable: true,
		},
	},
	{
		label: '权重:',
		prop: 'processingWeight',
		type: 'input',
		span: 8,
		inputProps: {
			clearable: true,
			placeholder: '  %',
		},
	},
	{
		label: '得分区间:',
		prop: 'processingSectionStart',
		type: 'inputNumber',
		controlsPosition: 'right',
		span: 4,
		inputProps: {},
		events: {
      change: (value: any, evt: any) => {}
    }
	},
	{
		label: '~　　　',
		prop: 'processingSectionEnd',
		type: 'inputNumber',
		controlsPosition: 'right',
		span: 4,
		inputProps: {},
		events: {
      change: (value: any, evt: any) => {}
    }
	},
	{
		label: '最终影响:',
		prop: 'ultimate',
		type: 'input',
		span: 8,
		inputProps: {
			clearable: true,
		},
	},
	{
		label: '权重:',
		prop: 'ultimateWeight',
		type: 'input',
		span: 8,
		inputProps: {
			clearable: true,
			placeholder: '  %',
		},
	},
	{
		label: '得分区间:',
		prop: 'ultimateSectionStart',
		type: 'inputNumber',
		controlsPosition: 'right',
		span: 4,
		inputProps: {},
		events: {
      change: (value: any, evt: any) => {}
    }
	},
	{
		label: '~　　　',
		prop: 'ultimateSectionEnd',
		type: 'inputNumber',
		controlsPosition: 'right',
		span: 4,
		inputProps: {},
		events: {
      change: (value: any, evt: any) => {}
    }
	},
];
